package com.chun.mapper;

import com.chun.pojo.Clazz;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

/**
 * Clazz数据访问层接口
 */
@Mapper
public interface ClazzMapper {

    List<Clazz> getClazzs(String name, Date begin, Date end);

    @Delete("delete from clazz where id = #{id}")
    void deleteClazzById(Integer id);

    void addClazz(Clazz clazz);

    @Select("select * from clazz where id = #{id}")
    Clazz getClazzById(Integer id);

    void updateClazz(Clazz clazz);

    @Select("select * from clazz")
    List<Clazz> getClazzList();
}
